export const ViewLayoutMixin = {
  data() {
    return {
      objRelation: {},
      pkFlg: false,//触发点击的标识，用于事件监控
      parentTableName: null,//触发点击变化的表的标识
      parentTableArr: []//所有含有子表的父表的集合
    }
  },
  methods: {
    setPk(record, tableName) {
      let flg = false
      Object.values(this.objRelation).forEach(relationVo => {
        if (relationVo.parentTableName == tableName) {
          relationVo.record = record
          flg = true
        }
      })
      if (flg) {
        this.pkFlg = !this.pkFlg
        this.parentTableName = tableName
      }
    }
  }
}